package com.iplant.mes.service.po.sfc;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.iplant.base.po.BasePO;
import com.iplant.base.po.enums.DBSchemas;
import com.iplant.base.utils.annotation.po.DBBasePO;
import com.iplant.base.utils.annotation.condition.DBCondition;
import com.iplant.base.utils.annotation.field.DBField;
import com.iplant.base.utils.annotation.join.DBJoin;

/**
 * 工位工序实时物料
 *
 * @author YouWang·Peng
 * 2023-9-8 11:26:42
 */
@DBBasePO(TableName = "sfc_station_material", Name = false, Active = false, Schemas = DBSchemas.MES,
        CheckName = {"Code", "StationID,RoutePartPointID,MaterialID"}, CodeAuto = true, CodePrefix =
        "SMLR-{yyMMdd}-",
        CodeNum = 4)
public class SFCStationMaterial extends BasePO {

    /**
     * 工位ID
     */
    @DBCondition
    @DBField
    public int StationID = 0;
    /**
     * 工位名称
     */
    @DBCondition(CompareType = DBCondition.DBCompareType.like)
    @DBJoin(name = "Name", tableName = "fmc_station", tableAsName = "fmc_station1", Schemas = DBSchemas.Basic,
            MainTableField = "StationID")
    public String StationName = "";
    /**
     * 工位编码
     */
    @DBCondition(CompareType = DBCondition.DBCompareType.like)
    @DBJoin(name = "Code", tableName = "fmc_station", tableAsName = "fmc_station1", Schemas = DBSchemas.Basic,
            MainTableField = "StationID")
    public String StationCode = "";

    /**
     * 工艺工序ID
     */
    @DBCondition
    @DBField
    public int RoutePartPointID = 0;
    /**
     * 工艺工序名称
     */
    @DBJoin(name = "Name", tableName = "fpc_routepartpoint", tableAsName = "fpc_routepartpoint1", Schemas =
            DBSchemas.PDM,
            MainTableField = "RoutePartPointID")
    public String RoutePartPointName = "";
    /**
     * 工艺工序编码
     */
    @DBJoin(name = "Code", tableName = "fpc_routepartpoint", tableAsName = "fpc_routepartpoint1", Schemas =
            DBSchemas.PDM,
            MainTableField = "RoutePartPointID")
    public String RoutePartPointCode = "";

    /**
     * 物料ID
     */
    @DBCondition
    @DBField
    public int MaterialID = 0;

    /**
     * 物料编码
     */
    @DBCondition(CompareType = DBCondition.DBCompareType.like)
    @DBJoin(name = "Code", tableName = "mss_material", tableAsName = "mss_material1", Schemas = DBSchemas.Basic,
            MainTableField = "MaterialID")
    public String MaterialCode = "";

    /**
     * 物料名称
     */
    @DBCondition(CompareType = DBCondition.DBCompareType.like)
    @DBJoin(name = "MaterialName", tableName = "mss_material", tableAsName = "mss_material1", Schemas = DBSchemas.Basic,
            MainTableField = "MaterialID")
    public String MaterialName = "";

    /**
     * 物料批次
     */
    @DBCondition
    @DBField
    public String BatchNumber = "";

    /**
     * 原料批次
     */
    @DBCondition(CompareType = DBCondition.DBCompareType.like)
    @DBField
    public String RawMaterialLot = "";

    public SFCStationMaterial() {
    }

    public SFCStationMaterial(int stationID, int routePartPointID, int materialID, String batchNumber) {
        StationID = stationID;
        RoutePartPointID = routePartPointID;
        MaterialID = materialID;
        BatchNumber = batchNumber;
    }

    @JsonProperty("StationID")
    public int getStationID() {
        return StationID;
    }

    public void setStationID(int stationID) {
        StationID = stationID;
    }

    @JsonProperty("StationName")
    public String getStationName() {
        return StationName;
    }

    public void setStationName(String stationName) {
        StationName = stationName;
    }

    @JsonProperty("StationCode")
    public String getStationCode() {
        return StationCode;
    }

    public void setStationCode(String stationCode) {
        StationCode = stationCode;
    }

    @JsonProperty("RoutePartPointID")
    public int getRoutePartPointID() {
        return RoutePartPointID;
    }

    public void setRoutePartPointID(int routePartPointID) {
        RoutePartPointID = routePartPointID;
    }

    @JsonProperty("RoutePartPointName")
    public String getRoutePartPointName() {
        return RoutePartPointName;
    }

    public void setRoutePartPointName(String routePartPointName) {
        RoutePartPointName = routePartPointName;
    }

    @JsonProperty("RoutePartPointCode")
    public String getRoutePartPointCode() {
        return RoutePartPointCode;
    }

    public void setRoutePartPointCode(String routePartPointCode) {
        RoutePartPointCode = routePartPointCode;
    }

    @JsonProperty("MaterialID")
    public int getMaterialID() {
        return MaterialID;
    }

    public void setMaterialID(int materialID) {
        MaterialID = materialID;
    }

    @JsonProperty("MaterialCode")
    public String getMaterialCode() {
        return MaterialCode;
    }

    public void setMaterialCode(String materialCode) {
        MaterialCode = materialCode;
    }

    @JsonProperty("MaterialName")
    public String getMaterialName() {
        return MaterialName;
    }

    public void setMaterialName(String materialName) {
        MaterialName = materialName;
    }

    @JsonProperty("BatchNumber")
    public String getBatchNumber() {
        return BatchNumber;
    }

    public void setBatchNumber(String batchNumber) {
        BatchNumber = batchNumber;
    }

    @JsonProperty("RawMaterialLot")
    public String getRawMaterialLot() {
        return RawMaterialLot;
    }

    public void setRawMaterialLot(String rawMaterialLot) {
        RawMaterialLot = rawMaterialLot;
    }
}
